// pages/album/album.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    choosed: false,
    pics: []
  },
  choosepic() {
    wx.chooseImage({
      count: 9,
      sourceType: ['album'],
      sizeType: ['original']
    }).then(res => {
      this.setData({
        pics: res.tempFilePaths,
        choosed: true
      })
    })
  },

  previewpic(e) {
    const path = e.target.dataset.path
    wx.previewImage({
      urls: this.data.pics,
      current: path
    })
  }
})